<template>
  <div class="">
    <el-card>
      <el-table
        :data="permissions"
        border
        style="width: 100%"
        row-key="id"
        default-expand-all
        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
      >
        <el-table-column
          width="200px"
          prop="permissionName"
          label="权限名称"
        ></el-table-column>
        <el-table-column
          width="200px"
          prop="permissionMark"
          label="权限标识"
        ></el-table-column>
        <el-table-column
          prop="permissionDesc"
          label="权限描述"
        ></el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script setup>
import { permissionList } from '@/api/permission'
import { ref } from 'vue'
const permissions = ref([])
const getPermissions = async () => {
  permissions.value = await permissionList()
  const list = JSON.stringify(permissions.value, null, 4)
  console.log(list)
}
getPermissions()
</script>

<style lang="scss" scoped></style>
